#@layout()

#define main()
<div class="jfa-header-box" id="jfa-header-box">
    <div class="jfa-crumbs" id="jfa-crumbs">
        挂具电泳框对照表
    </div>
    #include("/_view/common/_header_right.html")
</div>
<div class="jfa-content-box" id="jfa-content-box">
    <div class="jfa-content" id="jfa-content">
        <div class="margin-top-30">
            <form class="form-horizontal actionPanel" action="#" method="get">
                <div class="row">
                    <div class="form-group col-lg-4">
                        <label class="col-lg-4 control-label">挂具编号</label>
                        <div class="col-lg-8">
                            <input type="text" id="form-rackNo" class="form-control" name="rackNo">
                        </div>
                    </div>
                    <div class="form-group col-lg-5">
                        <label class="col-lg-4 control-label">电泳框编号</label>
                        <div class="col-lg-8">
                            <input type="text" id="form-frameNo" class="form-control" name="frameNo">
                        </div>
                    </div>
                    <div class="form-group col-lg-2">
                        <div class="col-lg-12">
                            <button type="button" class="btn btn-primary" onclick="searchRackFrame()">查询</button>
                            <button type="reset" class="btn btn-default">重置</button>
                        </div>
                    </div>
                </div>
            </form>
        </div>

        <table id="rackFrame">

        </table>
    </div>
</div>

<script type="text/javascript">
 	var datagridHeight=$("#jfa-content").height()-80;
 	$('#rackFrame').bootstrapTable({
        url: '#(ctx)/admin/rackFrame/list',
        method: 'get',
        striped: true,
        cache: false,
        pagination: true,
        sortable: false,
        sortOrder: "asc",
        queryParams: function (params) {
	            var data = {
	                    pageSize: params.limit,
	                    offset: params.offset,
	                    'rackNo': $("#form-rackNo").val(),
	                    'frameNo': $("#form-frameNo").val(),
	            };
	            return data;
        },
        sidePagination: "server",
        pageNumber:1,
        pageSize:10,
        pageList: [10,20,30,40,50,100],
        search: false,
        strictSearch: true,
        showColumns: false,
        showRefresh: false,
        minimumCountColumns: 2,
        clickToSelect: true,
       	height: datagridHeight,
        uniqueId: "id",
        showToggle:false,
        cardView: false,
        detailView: false,
        columns: [
            {
                field: 'hanger_no',  title: '挂具编号'
            }, {
                field: 'frame_no',  title: '电泳框编号'
            }, {
                field: 'update_time',  title: '修改时间'
            }, {
            	field: 'changeUser',  title: '修改人'
            },{
                title: '操作',formatter:operaterFormatter
            }
        ]
    });


function operaterFormatter(value, row, index){
	return "<a href='#(ctx)/admin/rackFrame/edit?id="+row.id+"'>"+
	"<i class='fa fa-pencil' title='修改'></i>"+
	" </a>"
}

function searchRackFrame(){
	$('#rackFrame').bootstrapTable("refresh",{silent: true});
    layer.msg('操作成功');
}
</script>
#end
